<?php use_helper('I18N') ?>

<?php echo form_tag('user/list', array('id' => 'frmlogin', 'name' => 'frmlogin')) ?>

<table width="950">
	<tr>
    	<td valign="top">
        	<table width="100%">
            	<tr>
                	<td align="left" class="welcome">WELCOME <?php echo $_SESSION['user_name']; ?></td>
                    <td width="16">&nbsp;</td>
                    <td width="164"></td>
                    <td width="70" align="right" valign="bottom"><img name="btnLogout" id="btnLogout" onmouseover="roll_over('btnLogout', '/images/logout_btnAF.jpg')" onmouseout="roll_over('btnLogout', '/images/logout_btn.jpg')" src="/images/logout_btn.jpg" border="0" onClick="location.href='/user/logout'" /></td>
                </tr>
                <tr>
                	<td colspan="4">
<?php echo link_to('User List','user/list') ?>&nbsp;&nbsp;&nbsp;
<?php echo link_to('Structure','structure/list') ?>&nbsp;&nbsp;&nbsp;
<?php echo link_to('CSS','structure/css') ?>&nbsp;&nbsp;&nbsp;
<?php echo link_to('Google Analytic','structure/ganalytic') ?>&nbsp;&nbsp;&nbsp;
<?php echo link_to('Share Script','structure/sharescript') ?>&nbsp;&nbsp;&nbsp;
<?php echo link_to('Landing Page Title','structure/landingtitle') ?>
                	</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td align="right"><?php echo button_to('New User','/user/edit') ?></td>
    </tr>
    <tr>
    	<td><div id="pm_ex_list" name="pm_ex_list">
        	<table class="admin" width="100%" cellpadding="0" cellspacing="0">
            	<tr>
                	<td align="left" class="adminTitle" height="40">&nbsp;User List</td>
                </tr>
                <?php
					$color = "#cfecdb";
					foreach ($tbl_users as $tbl_user){
						echo '<tr><td bgcolor="'.$color.'">';
						echo '<table width="100%"><tr>';
                        echo '<td width="935" align="left">'.$tbl_user->getFUsername().'</td>';
                        echo '<td width="66" align="left" valign="middle"><img src="/images/icon_edit.png" />&nbsp;<a href="'.url_for('/user/edit?f_id='.$tbl_user->getFId()).'" class="login">edit</a></td>';
                        echo '<td width="66" align="left" valign="middle"><img src="/images/icon_close.png" />&nbsp;'.link_to('delete','user/delete?f_id='.$tbl_user->getFId(), array('class'=>'login', 'post'=>'true', 'confirm'=>'Are you sure you want to delete?')).'</td>';
                      	echo '</tr></table>';
                       	echo '</td></tr>';
                            	
                      	if($color=="#cfecdb")
                      		$color="#ffffff";
                       	else
                       		$color = "#cfecdb";
					}
				?>
            </table>
            </div>
        </td>
    </tr>
</table>

</form>
